package com.cooksys.film_rental.bo;

import java.util.List;

import com.cooksys.film_rental.model.Actor;
import com.cooksys.film_rental.model.Film;
import com.cooksys.film_rental.model.FilmActor;
import com.cooksys.film_rental.model.FilmActorId;

/**
 * Business Object for the {@link FilmActor} class.
 * 
 * @author Peter Zastoupil
 * 
 */
public interface FilmActorBo {

	/**
	 * Saves a given {@link FilmActor} as a record in the database
	 * 
	 * @param filmActor
	 *            the FilmActor to save
	 */
	public void save(FilmActor filmActor);

	/**
	 * Updates the database record associated with the given {@link FilmActor}
	 * 
	 * @param filmActor
	 *            the FilmActor to be updated
	 */
	public void update(FilmActor filmActor);

	/**
	 * Deletes the database record associated with the given {@link FilmActor}
	 * 
	 * @param filmActor
	 *            the FilmActor to be deleted
	 */
	public void delete(FilmActor filmActor);

	/**
	 * 
	 * @param filmActorId
	 *            the filmActorId to search by
	 * @return a {@link FilmActor} object that corresponds to the given
	 *         filmCategoryId
	 */
	public FilmActor getFilmActorByFilmActorId(FilmActorId filmActorId);

	/**
	 * 
	 * @param filmId
	 *            the filmId to search by
	 * @param actorId
	 *            the actorId to search by
	 * @return a {@link FilmActor} object that corresponds to the given filmId
	 *         and actorId
	 */
	public FilmActor getFilmActorByFilmActorId(Short filmId, Short actorId);

	/**
	 * 
	 * @param filmId
	 *            String representation of the filmId to search by
	 * @param actorId
	 *            the actorId to search by
	 * @return a {@link FilmActor} object that corresponds to the given filmId
	 *         and actorId
	 */
	public FilmActor getFilmActorByFilmActorId(String filmId, Short actorId);

	/**
	 * 
	 * @param filmId
	 *            the filmId to search by
	 * @param actorId
	 *            String representation of the actorId to search by
	 * @return a {@link FilmActor} object that corresponds to the given filmId
	 *         and actorId
	 */
	public FilmActor getFilmActorByFilmActorId(Short filmId, String actorId);

	/**
	 * 
	 * @param filmId
	 *            String representation of the filmId to search by
	 * @param actorId
	 *            String representation of the actorId to search by
	 * @return a {@link FilmActor} object that corresponds to the given filmId
	 *         and actorId
	 */
	public FilmActor getFilmActorByFilmActorId(String filmId, String actorId);

	/**
	 * 
	 * @param film
	 *            the {@link Film} to search by
	 * @return a List of {@link FilmActor} objects associated with the given
	 *         film
	 */
	public List<FilmActor> searchFilmActorsByFilm(Film film);

	/**
	 * 
	 * @param actor
	 *            the {@link Actor} to search by
	 * @return a List of {@link FilmActor} objects associated with the given
	 *         actor
	 */
	public List<FilmActor> searchFilmActorsByActor(Actor actor);

}